using IFix.Core;
using System;
using System.Collections;
using Yunchang;

namespace IFix
{
	public class ILFixDynamicMethodWrapper
	{
		private VirtualMachine virtualMachine;

		private int methodId;

		private object anonObj;

		public static ILFixDynamicMethodWrapper[] wrapperArray;

		public ILFixDynamicMethodWrapper(VirtualMachine virtualMachine, int methodId, object anonObj)
		{
			this.virtualMachine = virtualMachine;
			this.methodId = methodId;
			this.anonObj = anonObj;
		}

		public int __Gen_Wrap_0(object P0, int P1, int P2)
		{
			Call call = Call.Begin();
			if (this.anonObj != null)
			{
				call.PushObject(this.anonObj);
			}
			call.PushObject(P0);
			call.PushInt32(P1);
			call.PushInt32(P2);
			this.virtualMachine.Execute(this.methodId, ref call, (this.anonObj != null) ? 4 : 3, 0);
			return call.GetInt32(0);
		}

		public void __Gen_Wrap_1(string P0)
		{
			Call call = Call.Begin();
			if (this.anonObj != null)
			{
				call.PushObject(this.anonObj);
			}
			call.PushObject(P0);
			this.virtualMachine.Execute(this.methodId, ref call, (this.anonObj != null) ? 2 : 1, 0);
		}

		public int __Gen_Wrap_2(int P0)
		{
			Call call = Call.Begin();
			if (this.anonObj != null)
			{
				call.PushObject(this.anonObj);
			}
			call.PushInt32(P0);
			this.virtualMachine.Execute(this.methodId, ref call, (this.anonObj != null) ? 2 : 1, 0);
			return call.GetInt32(0);
		}

		public void __Gen_Wrap_3(object P0)
		{
			Call call = Call.Begin();
			if (this.anonObj != null)
			{
				call.PushObject(this.anonObj);
			}
			call.PushObject(P0);
			this.virtualMachine.Execute(this.methodId, ref call, (this.anonObj != null) ? 2 : 1, 0);
		}

		public BattleViewCenter __Gen_Wrap_4()
		{
			Call call = Call.Begin();
			if (this.anonObj != null)
			{
				call.PushObject(this.anonObj);
			}
			this.virtualMachine.Execute(this.methodId, ref call, (this.anonObj != null) ? 1 : 0, 0);
			return call.GetAsType<BattleViewCenter>(0);
		}

		public float __Gen_Wrap_5(object P0)
		{
			Call call = Call.Begin();
			if (this.anonObj != null)
			{
				call.PushObject(this.anonObj);
			}
			call.PushObject(P0);
			this.virtualMachine.Execute(this.methodId, ref call, (this.anonObj != null) ? 2 : 1, 0);
			return call.GetSingle(0);
		}

		public System.Collections.IEnumerator __Gen_Wrap_6(object P0)
		{
			Call call = Call.Begin();
			if (this.anonObj != null)
			{
				call.PushObject(this.anonObj);
			}
			call.PushObject(P0);
			this.virtualMachine.Execute(this.methodId, ref call, (this.anonObj != null) ? 2 : 1, 0);
			return call.GetAsType<System.Collections.IEnumerator>(0);
		}

		static ILFixDynamicMethodWrapper()
		{
			ILFixDynamicMethodWrapper.wrapperArray = new ILFixDynamicMethodWrapper[0];
		}
	}
}
